package com.sms.shared;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "equipmentonofftime")
public class EquipmentOnOffTime implements Serializable {
	public EquipmentOnOffTime() {

	}

	@Id
	@GenericGenerator(name = "generator", strategy = "increment")
	@GeneratedValue(generator = "generator")
	@Column(name = "Id")
	private Long id;
	@Column
	private java.util.Date onTime;
	@Column
	private java.util.Date offTime;
	@Column
	private java.util.Date createdDate;
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "equipmentId", insertable = true, updatable = true)
	private Equipment equipment;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public java.util.Date getOnTime() {
		return onTime;
	}
	public void setOnTime(java.util.Date onTime) {
		this.onTime = onTime;
	}
	public java.util.Date getOffTime() {
		return offTime;
	}
	public void setOffTime(java.util.Date offTime) {
		this.offTime = offTime;
	}
	public java.util.Date getCreatedDate() {
		return createdDate;
	}
	public void setCreatedDate(java.util.Date createdDate) {
		this.createdDate = createdDate;
	}
	public Equipment getEquipment() {
		return equipment;
	}
	public void setEquipment(Equipment equipment) {
		this.equipment = equipment;
	}

}
